/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tecken;

import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;

/**
 *
 * @author Wolf
 */
public class ActionListener implements KeyListener{
    MainModel m;

    public ActionListener(MainModel mm){
        m = mm;
    }

    public void keyTyped(KeyEvent e) {
        if(! (e.getKeyChar() == 's'))
        m.readKey(e.getKeyChar());
    }

    public void keyPressed(KeyEvent e) {
                if( (e.getKeyChar() == 's'))
        m.readKey(e.getKeyChar());
    }

    public void keyReleased(KeyEvent e) {
                if( (e.getKeyChar() == 's'))
        m.readKey(e.getKeyChar());
    }

}
